package com.wx.tnsperson.service.impl;



import com.wx.tnsperson.mapper.ProRegisterAndLoginMapper;
import com.wx.tnsperson.service.ProRegisterAndLoginService;
import com.wx.tnsperson.vo.ResumeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;


/**
 * @Author:LLH
 * @Date:2020/7/24
 */
@Service
public class ProRegisterAndLoginServiceImpl implements ProRegisterAndLoginService {

    @Autowired
    private ProRegisterAndLoginMapper proRegisterAndLoginMapper;

    @Override
    public Integer registerPhone ( ResumeVo resumeVo) {
        return proRegisterAndLoginMapper.registerPhone ( resumeVo );

    }

    @Override
    public Integer registerUser (ResumeVo resumeVo ) {
        return proRegisterAndLoginMapper.registerUser ( resumeVo );
    }

    @Override
    public boolean loginPhone ( String phone ) {
        ResumeVo vo = proRegisterAndLoginMapper.loginPhone ( phone );
        return vo  == null?true:false;
    }

    //在数据库中查询是否有数据
    @Override
    public ResumeVo loginUser ( ResumeVo resumeVo ) {
        ResumeVo rVo = proRegisterAndLoginMapper.loginUser ( resumeVo );
        return  rVo;

    }

    @Override
    public ResumeVo findByPhone (  ResumeVo resumeVo ) {
        ResumeVo rVo = proRegisterAndLoginMapper.findByPhone ( resumeVo );
        return rVo ;
    }

    @Override
    public ResumeVo findById ( Integer id ) {
        return proRegisterAndLoginMapper.findById ( id );
    }

    @Override
    public List<ResumeVo> findAll () {
        return proRegisterAndLoginMapper.findAll ();
    }


}
